package com.huangyi.rabbitmq_spring.listener;

import com.huangyi.rabbitmq_spring.constants.Constants;
import org.springframework.amqp.rabbit.annotation.RabbitListener;

public class TopicsListener {
    @RabbitListener(queues = Constants.TOPIC_QUEUE1)
    public void topicListener1(String message){
        System.out.println( "队列["+Constants.TOPIC_QUEUE1+"] 接收到消息:" + message);

    }

    @RabbitListener(queues = Constants.TOPIC_QUEUE2)
    public void topicListener2(String message){
        System.out.println( "队列["+Constants.TOPIC_QUEUE2+"] 接收到消息:" + message);

    }
}
